<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

	<title>vue prop 验证</title>
</head>
<body>
	<div id="app">
      <my-comp data-title="learn vue" class="mycls" style="color:red;"></my-comp>
 	</div>
</body>
</html>
<script type="text/javascript">
	
     Vue.component('my-comp', {
     	mounted: function () {
        	console.log(this.$el.getAttribute('data-title'));
    	},
         template: '<div>我是组件</div>'
     });
     new Vue({
          el: '#app'
     });
</script>